import React from 'react';
import {text} from "../../recoils/atoms";
import {useRecoilValue, useSetRecoilState, useRecoilState} from "recoil";

function ComponentA () {

    const getText = useRecoilValue(text);
    console.log('--rendered ComponentA--')


    return (<div className="form-group border">
        <h2>ComponentA</h2>
        <div className="form-group">
            <span className="text-primary">useRecoilValue: </span>
            <strong>{getText}</strong>
        </div>
    </div>)
}

export default React.memo(ComponentA);